<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      layout:decorator="layout/bootstrap4">
<head>
    <meta charset="UTF-8">
    <title th:text="${@viewHelper.metaTitle(post.title)}"></title>
</head>
<body>
<div layout:fragment="content">
    <div class="post-page">
        <div class="blog-post">
            <div class="post-title text-center mt-5">
                <h1 class="blog-post-title" th:text="${post.title}"></h1>
                <p class="blog-post-meta text-muted">
                    <span>发布于</span>
                    <span th:text="${@viewHelper.getFormattedDate(post.getCreatedAt())}"></span>
                    <span>/</span>
                    <span>阅读</span>
                    <span th:text="${post.views}"></span>
                </p>
            </div>
            <div class="row" id="post-content-wrapper" th:if="${postType}=='POST'">
                <div class="col-9">
                    <div class="post-content pt-5">
                        <div th:utext="${post.renderedContent}"></div>
                    </div>
                </div>
                <div class="col-3">
                    <div id="post-contents" class="pt-5">
                        <label class="text-muted">目录</label>
                    </div>
                </div>
            </div>
            <div class="row" id="post-content-wrapper" th:if="${postType}=='PAGE'">
                <div class="col-12">
                    <div class="post-content pt-5">
                        <div th:utext="${post.renderedContent}"></div>
                    </div>
                </div>
            </div>

            <div class="pt-3">
                <hr/>
                <div class="pt-2">
                    <div th:replace="fragments/disqus :: disqus"></div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
